package tests;

import Common.Utils;
import org.openqa.selenium.By;

public class adminListPage extends Utils {
        public static String url = "http://localhost:8080/admin/user";

        public adminListPage() {
            super(url);
        }


        //检查页面是否加载成功
        public void adminListPageRight() throws InterruptedException {
            //通过查看页面元素是否存在来检查页面加载成功与否
            driver.findElement(By.cssSelector("#basicLayout > section > main > form > div:nth-child(1) > div.arco-form-item-label-col > label"));
            driver.findElement(By.cssSelector("#basicLayout > section > main > form > div:nth-child(2) > div.arco-form-item-label-col > label"));
            Thread.sleep(1000);
        }

        //查找操作
        public void findAdminListPage() throws InterruptedException {
            driver.navigate().refresh();
            //通过查看页面元素是否存在来检查页面加载成功与否
            driver.findElement(By.cssSelector("#userName > div > div > span > input")).clear();
            driver.findElement(By.cssSelector("#userName > div > div > span > input")).sendKeys("wanghui");
            driver.findElement(By.cssSelector("#basicLayout > section > main > form > div:nth-child(3) > div.arco-form-item-wrapper-col > div > div > button")).click();
            Thread.sleep(1000);
        }
}
